{include file="public/header"}
<!-- 页体 -->
<div class="mdui-container">

    <!-- 标题组件 -->
    <div class="mdui-row">
        <div class="mdui-col-xs-6">
            <h1 class="mdui-text-color-theme mdui-p-t-2">{$ViewTitle}</h1>
        </div>
        <div class="mdui-col-xs-6">
            <button class="mdui-m-t-4 mdui-float-right mdui-btn mdui-btn-raised mdui-color-theme-accent mdui-ripple"
                onclick="jumpUrl('/admin/Cards/setting',0)">模块设置</button>
        </div>
    </div>

    <!-- 主体组件 -->
    <div class="mdui-card mdui-p-a-2">
        <div class="mdui-table-fluid mdui-shadow-0 mdui-m-b-1">
            <table class="mdui-table mdui-typo">
                <thead>
                    <tr>
                        <th>ID</th>
                        <th>封禁状态</th>
                        <th>置顶状态</th>
                        <th>模型</th>
                        <th>名字</th>
                        <th>联系方式</th>
                        <th>TA的名字</th>
                        <th>TA的联系方式</th>
                        <th>内容</th>
                        <th>点赞数</th>
                        <th>评论数</th>
                        <th>浏览量</th>
                        <th>图片</th>
                        <th>时间</th>
                        <th>IP</th>
                        <th class="mdui-table-col-numeric">操作</th>
                    </tr>
                </thead>
                <tbody>
                    {volist name='CommonNowList' id='D'}
                    <tr>
                        <td>{$D.id}</td>
                        <td value="{$D.status}">
                            <div class="mdui-chip">
                                <span class="mdui-chip-title">
                                    {if $D.status == 0}
                                    正常
                                    {/if}
                                    {if $D.status == 1}
                                    封禁
                                    {/if}
                                </span>
                            </div>
                        </td>
                        <td value="{$D.top}">
                            <div class="mdui-chip">
                                <span class="mdui-chip-title">
                                    {if $D.top == 0}
                                    关闭
                                    {/if}
                                    {if $D.top == 1}
                                    置顶
                                    {/if}
                                </span>
                            </div>
                        </td>
                        <td>
                            <div class="mdui-chip">
                                <span class="mdui-chip-title">
                                    {if $D.model == 0}
                                    表白卡
                                    {/if}
                                    {if $D.model == 1}
                                    交流卡
                                    {/if}
                                </span>
                            </div>
                        </td>
                        <td>{if $D.woName != ''}{$D.woName}{else}[匿]{/if}</td>
                        <td>{if $D.woContact != ''}{$D.woContact}{else}[无]{/if}</td>
                        <td>{$D.taName}</td>
                        <td>{if $D.taContact != ''}{$D.taContact}{else}[无]{/if}</td>
                        <td>
                            <input class="js-mdui-Tooltip mdui-textfield-input" style="width:unset" type="text"
                                value="{$D.content}" readonly="true" />
                        </td>
                        <td>{$D.good}</td>
                        <td>{$D.comments}</td>
                        <td>{$D.look}</td>
                        <td>
                            <div class="mdui-chip">
                                <span class="mdui-chip-title">
                                    {if $D.img != ''}有{else}无{/if}
                                </span>
                            </div>
                        </td>
                        <td>{$D.time}</td>
                        <td>{$D.ip}</td>
                        <td>
                            <button class="js-Btn-Edit mdui-btn mdui-btn-icon"
                                onclick="jumpUrl('/admin/cards/edit/id/{$D.id}',0)">
                                <i class="mdui-icon material-icons">edit</i>
                            </button>
                            <button class="js-Btn-Delete mdui-btn mdui-btn-icon">
                                <i class="mdui-icon material-icons">delete</i>
                            </button>
                        </td>
                    </tr>
                    {/volist}
                </tbody>
            </table>
        </div>
        <!-- 分页按钮组件 -->
        {include file="public/easyPaging"}
    </div>



</div>
{include file="public/footer"}

<script>

    //实例化
    let IndexEntity = new Index();

    $(function (param) {
        //初始化-分页组件
        pager();

        //按钮-删除
        $('.js-Btn-Delete').click(function () {
            const id = $(this).parent().siblings('td:first').html();
            IndexEntity.PostDelete(id);
        });
    })
</script>
</body>

</html>